<?php
include_once '../../vendor/autoload.php';

use Union\Pay\Factory;

date_default_timezone_set('PRC');

$config = include_once './Config/Config.php';

 $body['requestTimestamp'] = date("YmdHis", time());
// 订单号
$body['merOrderId'] = $outTradeNo;
// 订单描述 展示在支付截图中
$body['orderDesc'] = '线上商城商品';
// 支付总金额
$body['totalAmount'] = (int)helper::bcmul($totalFee, 100);
try {
    // 统一下单API
    // Doc: https://open.chinaums.com/saas-doc/openplate/netpay/mini-program/transaction/VxXa3w2o.html
    Factory::config($config);
    $reponse = Factory::WechatH5()->pay($body);dd($reponse);
}catch(Exception $e){

}



